﻿@model IEnumerable<KCMS.BusinessLogic.Models.CartItem>
@using KCMS.Helpers;
@{
    ViewBag.Title = "ShowDetails";

}

@if (Model != null)
{
    <table class="cart-table">
        <tr>
            <th>
                Наименование
            </th>
            <th>
                Артикул
            </th>
            <th>
                Фото
            </th>
            <th>
                Размер
            </th>
            <th>
                Количество
            </th>
            <th>
                Цена, руб.
            </th>
            <th>
                Cумма, руб.
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Product.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Product.Article)
                </td>
                <td>
                    <img src="@Url.ContentImageUpload(item.ProductImage.ColorImageFile)" style="width:60px;">
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Size.Title)
                </td>
                <td>
                    @using (Html.BeginForm())
                    {
                 
                        <span class="cart-item-quantity">
                            @Html.DisplayFor(modelItem => item.quantity)
                        </span>
                    }
                </td>
                <td class="cart-item-price">
                    @Html.DisplayFor(modelItem => item.Product.Price)
                </td>
                <td class="cart-item-summa">
                    @{ double summa = item.Product.Price * item.quantity;}
                    @summa
                </td>
                
            </tr>
        }
    </table>
    <span class="cart-total-details">Итого: <span class="cart-total"></span></span>

}